#ifndef CAMERA_H
#define CAMERA_H

#include "D3dUtil.h"


class Camera
{
public:
	Camera(float width
		, float height
		, float fov
		, float near
		, float far);
	~Camera();
	
	void BuildProjMtx();
	void BuildViewMtx();

	void OnResetDevice();
	void OnLostDevice();

	void UpdateCamera(float dt);

	void GetViewMtx(D3DXMATRIX &view){ view = mView; }
	void GetProjMtx(D3DXMATRIX &proj){ proj = mProj; }
	D3DXVECTOR3 GetPos() { return pos;}

private:

	float speed;
	float screenWidth;
	float screenHeight;
	float fov;
	float nearClip;
	float farClip;

	float mCameraHeight;
	float mCameraRotationY;
	float mCameraRadius;

	D3DXMATRIX mProj;
	D3DXMATRIX mView;

	D3DXVECTOR3 pos;
	D3DXVECTOR3 offsetPos;
	D3DXVECTOR3 up;
	D3DXVECTOR3 target;
};

#endif